/**
 * 
 */
package com.acc.softmgr.common.genertor.gen;

import java.util.Date;

import org.apache.velocity.VelocityContext;

import com.acc.softmgr.common.genertor.utils.CodeResourceUtil;
import com.acc.softmgr.common.genertor.utils.CommUtil;
import com.acc.softmgr.common.genertor.utils.PageParserUtil;

/**
 * 
 * @content 生成Mapper
 * 
 * @date 2017年5月20日
 * 
 * @author OprCalf
 * 
 */
public class GenerateDao extends BaseGenerate {

	public static void genDao(String tableName, String pckPath, String mapperPath) {
		String className = CommUtil.formatTableNameToClassName(tableName);
		
		VelocityContext context = new VelocityContext();
		context.put("basePackage", CodeResourceUtil.basePackage);
		context.put("className", className);
		context.put("createDate", new Date());
		
		PageParserUtil.WriterPage(context, "DaoTemplate.ftl", pckPath, mapperPath);
	}



}
